<?php
include("../lib/lib_online_payment.php");
$m=0;

$receiver=new receiver($_POST["receiver_epsn"],$_POST["receiver_user_ID"]);
$payer=new payer($_POST["payer_epsn"],$_POST["payer_user_ID"]);

if($payer->intend_to_pay($receiver,$_POST["amount"],$_POST["memo"],true))
{
	$doc[$m]["title"]="网上付款成功";
	$doc[$m]["content"]='您的支付已经提交，请到<a href="../confirm.php">这里</a>确认。';
	$doc[$m]["wid"]='100%';
	$m++;
}
else
{
	$doc[$m]["title"]="网上付款失败";
	$doc[$m]["content"]='您的帐户余额不足，现在我们的充值系统暂时关闭。请您用其他方法支付（您可以按回退键回到前面的页面）。由此造成的不便敬请谅解。';
	$doc[$m]["wid"]='100%';
	$m++;
}

include("render.php");
render("网上付款",$nav_title,$nav_link,$doc);
?>